#!/usr/bin/python
# -*- coding: utf8 -*- 
# ========================================================================
# packages
from numpy import arange
import os

# matrices filenames
K_filename = 'matrices/PolishGrid_CxK.dat' # the K matrix
C_filename = 'matrices/PolishGrid_CxC.dat' # the C matrix

# output filename
output_filename = 'results/PolishGrid_HRN_theo_perco.plt'

# probability T
T_min = 0.0
T_max = 1.0
T_inc = 0.01

# compiles the c++ code
os.system('g++ -O3 src/hrn.cpp -o hrn')

# computes the size of the giant component for each value of T
for T in arange(T_min,T_max+T_inc,T_inc):
  execution_line = './bin/hrn ' + K_filename + ' ' + C_filename + ' ' + str(T) + ' ' + output_filename
  os.system(execution_line)
